<html>
  <head>
    <%- include('./includes/head', { siteTitle: `${post.title} | ${themeConfig.siteName}` }) %>
  </head>
  <body>
    <div class="main">
      <div class="main-content">
        <%- include('./includes/header') %>

        <div class="post-detail">
          <article class="post">
            <h2 class="post-title">
              <%= post.title %>
            </h2>
            <div class="post-info">
              <time class="post-time">
                · <%= post.dateFormat %> ·
              </time>
              <% post.tags.forEach(function(tag) { %>
                <a href="<%= tag.link %>" class="post-tag">
                  # <%= tag.name %>
                </a>
              <% }); %>
            </div>
            <% if (themeConfig.showFeatureImage && post.feature) { %>
              <div class="post-feature-image" style="background-image: url('<%= post.feature %>')">
              </div>
            <% } %>
            <div class="post-content">
              <%- post.content %>
            </div>
          </article>
        </div>

        <% if (post.nextPost && !post.hideInList) { %>
          <div class="next-post">
            <div class="next">下一篇</div>
            <a href="<%= post.nextPost.link %>">
              <h3 class="post-title">
                <%= post.nextPost.title %>
              </h3>
            </a>
          </div>
        <% } %>

        <% if (typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
          <% if (commentSetting.commentPlatform === 'gitalk') { %>
            <%- include('./includes/gitalk') %>
          <% } %>

          <% if (commentSetting.commentPlatform === 'disqus') { %>
            <%- include('./includes/disqus') %>
          <% } %>
        <% } %>

        <%- include('./includes/footer') %>
      </div>
    </div>
  </body>
</html>
